﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EditRequest.aspx.cs" Inherits="Ebiz.EditRequest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="css/pager.css" rel="stylesheet" type="text/css" />
    <link href="css/uploadify.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var Form1 = "<%= Form1.ClientID %>";
        var fileUpCtrl = "<%= fileUpCtrl.ClientID %>";
        var btnSave = "<%= btnSave.ClientID %>";
    </script>
    <script src="js/jquery.uploadify.js" type="text/javascript"></script>
    <script src="js/EditRequest.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="server">
    <h3>Edit Request</h3>
    <form name="Form1" id="Form1" enctype="multipart/form-data" method="post" runat="server">
        <table align="center" cellpadding="6" cellspacing="0" 
            style="font-size: 12px; font-family: Arial; width:100%">
            <tr><td colspan="7"><input type="hidden" id="txtIDCLOri" value="<%= CLNumber %>" /></td></tr>
            <tr>
                <td align="left" height="24px">Distributor</td>
                <td>:</td>
                <td align="left" colspan="5">
                    <select name="cbDistributor" id="cbDistributor" style="font-size:12px; width:214px;">
                        <%= DistributorList %>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="left" height="24px">Dicount Type</td>
                <td>:</td>
                <td align="left" colspan="5" valign="top">
                    <select name="cbDiscType" id="cbDiscType" style="font-size:12px;">
                        <option value="0">--- SELECT ---</option>
                        <%= TipeDiskon %>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="left" height="24px">Channel</td>
                <td>:</td>
                <td align="left" colspan="5" valign="top">
                    <select name="cbChannel" id="cbChannel" style="font-size:12px; width:214px;">
                        <%= ChannelList %>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="left" height="24px">Previous CL#</td>
                <td>:</td>
                <td align="left" colspan="5">
                    <input type="text" name="txtPrevCL" id="txtPrevCL" value="<%= PrevCL %>" maxlength="64" style="font-size:12px;width:210px;" />
                </td>
            </tr>
            <tr>
                <td align="left" height="24px">CL Customer Name</td>
                <td>:</td>
                <td align="left" colspan="5" valign="top">
                    <input type="text" name="txtCLCustName" id="txtCLCustName" value="<%= CLCustName %>" maxlength="128" style="font-size:12px;width:210px;" />
                </td>
            </tr>
            <tr>
                <td align="left" height="24px">Customer Group</td>
                <td>:</td>
                <td align="left" colspan="5" valign="top">
                    <input type="text" name="txtCustGroup" id="txtCustGroup" value="<%= CustomerGroup %>" maxlength="128" style="font-size:12px;width:210px;" />
                </td>
            </tr>
            <tr><td colspan="7">&nbsp;</td></tr>
            <tr>
                <td align="left" valign="middle" height="24px">Customer List</td>
                <td>:</td>
                <td align="left" colspan="5">
                    <div id="btnAddCustomer" class="btnForm fl_left" style="padding:1px 10px; margin:0; line-height:normal; width:120px; height:16px; color: #009900;">Select Customer</div>
                    <div id="btnClearCust" class="btnForm fl_right" style="padding:1px 5px; margin:0; line-height:normal; width:90px; height:16px; color: #009900;">Clear</div>
                    <div class="cl_both"></div>
                </td>
            </tr>
            <tr>
                <td align="left" colspan="7">
                    <table id="tblCustomers" class="tblstyle" border="0" style="margin-bottom:3px;">
                        <thead style="display:block;">
                            <tr>
                                <th colspan="2">Customer Code</th>
                                <th rowspan="2" style="table-layout:fixed; width:263px;">Customer Name</th>
                                <th rowspan="2" style="table-layout:fixed; width:254px;">Address</th>
                                <th rowspan="2" style="table-layout: fixed; width:37px; text-align:center;">&nbsp;</th>
                            </tr>
                            <tr>
                                <th style="table-layout:fixed; width:81px;">Distributor</th>
                                <th style="table-layout:fixed; width:81px;">AZI</th>
                            </tr>
                        </thead>
                        <tbody style="display:block; height:178px; overflow-y:scroll;">
                            <%= RequestCustomers %>
                        </tbody>
                    </table>
                    <div style="position: relative; color:#6600CC;">
                        <div class="fl_left">Total Customer:</div>
                        <div id="totalCust" class="fl_left" style="margin-left:5px;"><%= TotalCust %></div>
                        <div class="cl_left"></div>
                    </div>
                </td>
            </tr>
            <tr><td colspan="7">&nbsp;</td></tr>
            <tr><td colspan="7">&nbsp;</td></tr>
            <tr>
                <td align="left" valign="top">Reason to give Discount</td>
                <td valign="top">:</td>
                <td align="left" colspan="5" valign="top">
                    <textarea name="txtReason" id="txtReason" style="font-size:12px;width:482px;height:90px;" maxlength="225"><%= DiscReason %></textarea>
                </td>
            </tr>
            <tr><td align="left" colspan="7">&nbsp;</td></tr>
            <tr>
                <td align="left" valign="middle" height="24px">Date Start</td>
                <td>:</td>
                <td align="left" valign="top">
                    <input type="text" name="txtDate1" id="txtDate1" class="txtDatePick" readonly="readonly" value="<%= InitDateStart %>" />
                </td>
                <td>&nbsp;</td>
                <td align="left" valign="middle">Date End</td>
                <td>:</td>
                <td align="left" valign="top">
                    <input type="text" name="txtDate2" id="txtDate2" class="txtDatePick" readonly="readonly" value="<%= InitDateEnd %>" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="middle" height="24px">Discount</td>
                <td>:</td>
                <td align="left" valign="top">
                    <input type="text" name="txtDiscount" id="txtDiscount" value="" maxlength="6" style="text-align:right;font-size:12px;width:90px;" />&nbsp;%
                </td>
                <td>&nbsp;</td>
                <td align="left" valign="middle">Quantity</td>
                <td>:</td>
                <td align="left">
                    <input type="text" name="txtQuantity" id="txtQuantity" value="" maxlength="14" style="text-align:right;font-size:12px;width:90px;" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="middle" height="24px">Product Division</td>
                <td>:</td>
                <td align="left" colspan="5">
                    <input type="text" name="txtProdDiv" id="txtProdDiv" value="<%= ProdDivision %>" style="font-size:12px;width:90px;" maxlength="8" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="middle" colspan="7">&nbsp;</td>
            </tr>
            <tr>
                <td align="left" valign="middle">Products List</td>
                <td>:</td>
                <td align="left" colspan="5">
                    <div id="btnAddProduct" class="btnForm fl_left" style="padding:1px 10px; margin:0; line-height:normal; width:120px; height:16px; color: #009900;">Select Product</div>
                    <div id="btnClearProd" class="btnForm fl_right" style="padding:1px 5px; margin:0; line-height:normal; width:90px; height:16px; color: #009900;">Clear</div>
                    <div class="cl_both"></div>
                </td>
            </tr>
            <tr>
                <td align="left" valign="middle" colspan="7">
                    <table id="tblProducts" class="tblstyle" border="0" style="margin-bottom:3px;">
                        <thead style="display:block;">
                            <tr>
                                <th style="table-layout: fixed; width:81px;">Product Code</th>
                                <th style="table-layout: fixed; width:454px;">Product Name</th>
                                <th style="table-layout: fixed; width:72px; text-align:center;">Disc</th>
                                <th style="table-layout: fixed; width:72px; text-align:center;">Qty</th>
                                <th style="table-layout: fixed; width:37px; text-align:center;">&nbsp;</th>
                            </tr>
                        </thead>
                        <tbody style="display:block; height:178px; overflow-y:scroll;">
                            <%= RequestProducts %>
                        </tbody>
                    </table>
                    <div style="position: relative; color:#6600CC;">
                        <div class="fl_left">Total Products:</div>
                        <div id="totalProd" class="fl_left" style="margin-left:5px;"><%= TotalProd %></div>
                        <div class="cl_left"></div>
                    </div>
                </td>
            </tr>
            <tr><td colspan="7">&nbsp;</td></tr>
            <tr><td align="center" colspan="7">&nbsp;</td>
            </tr>
            <tr>
                <td align="left" valign="top">Supporting Document</td>
                <td valign="middle">:</td>
                <td align="left" colspan="5" valign="top" rowspan="3">
                    <div style="margin-bottom:10px;"><%= RequestFiles %></div>
                    <div id="divUpList" style="margin-left:10px;">
                        <asp:FileUpload ID="fileUpCtrl" runat="server" Font-Size="12px" />
                    </div>
                </td>
            </tr>
            <tr><td colspan="2">&nbsp;</td></tr>
            <tr><td colspan="2">&nbsp;</td></tr>
            <tr>
                <td colspan="7">
                    <input type="hidden" name="queuesize" id="queuesize" value="<%= FileQueue %>" />
                    <input type="hidden" name="totalFSize" id="totalFSize" value="<%= MaxFileSize %>" />
                    <span id="RuleCtrl" style="display:none;"><%= IDControl %></span>
                    <span id="RuleVal" style="display:none;"><%= Value1 %></span>
                    <span id="RuleValExt" style="display:none;"><%= Value2 %></span>
                    <span id="MaxLayers" style="display:none;"><%= ApprovalMax %></span>
                    <span id="MaxDisc" style="display:none;"><%= MaxDiscount %></span>
                    <span id="FixDisc" style="display:none;">0</span>
                </td>
            </tr>
            <tr><td align="left" valign="top" colspan="7">&nbsp;</td></tr>
            <tr><td align="left" valign="top" colspan="7">&nbsp;</td></tr>
            <tr>
                <td align="left" valign="top">Approval Process &nbsp;<span id="spnMaxSteps">(Max: <%= ApprovalMax %>)</span></td>
                <td valign="top">:</td>
                <td align="left" valign="top" colspan="5">
                    <div id="divApproval"><%= ApprovalList %></div>
                </td>
            </tr>
            <tr><td align="left" valign="top" colspan="7">&nbsp;</td></tr>
            <tr><td align="left" valign="top" colspan="7">&nbsp;</td></tr>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td align="left" colspan="5">
                    <asp:Button ID="btnSave" runat="server" CssClass="btnForm" Text="Submit" Width="120px" />
                </td>
            </tr>
            <tr>
                <td align="left" valign="top" colspan="7">&nbsp;</td>
            </tr>
            <tr>
                <td align="left" valign="top" colspan="7"><%= Test %></td>
            </tr>
        </table>
    </form>
</asp:Content>